package com.example.ex2.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;
import java.util.Timer;
@Data
@TableName(value = "info")
public class Returninfo {
    @TableId(type = IdType.AUTO)
    private int id;
    private String username;
    private String itemname;
    private int return_state;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date return_time;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date borrow_time;
    private int user_id;
    private int item_id;

    public Returninfo() {
    }

    public Returninfo(int id, int user_id, int item_id) {
        this.id = id;
        this.user_id = user_id;
        this.item_id = item_id;
    }

    public Returninfo(int id, String username, String itemname, int return_state, Date return_time, Date borrow_time) {
        this.id = id;
        this.username = username;
        this.itemname = itemname;
        this.return_state = return_state;
        this.return_time = return_time;
        this.borrow_time = borrow_time;
    }
}
